package com.wcar.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 产品审核表，存储所有产品审核相关信息
 * @TableName tb_product_examine
 */
@TableName(value ="tb_product_examine")
@Data
public class ProductExamine implements Serializable {
    /**
     * 商品审核表id
     */
    @TableId(type = IdType.AUTO)
    private Integer productExamineId;

    /**
     * 门店id
     */
    private Integer storeId;

    /**
     * 商品分类表id
     */
    private Integer proTypeId;

    /**
     * 商品id
     */
    private Integer productId;

    /**
     * 商品名称
     */
    private String name;

    /**
     * 商品图片
     */
    private String picture;

    /**
     * 原价
     */
    private Integer loadPrice;

    /**
     * 现价
     */
    private Integer newPrice;

    /**
     * 是否启用积分
     */
    private String pointsenabled;

    /**
     * 商品积分
     */
    private Integer points;

    /**
     * 月销售额
     */
    private Double monthlySales;

    /**
     * 运费是否包邮
     */
    private String isFreightShipping;

    /**
     * 运费
     */
    private Double freight;

    /**
     * 是否上线（0,1）
     */
    private String isline;

    /**
     * 商品详情
     */
    private String productDetails;

    /**
     * 温馨提示
     */
    private String prompt;

    /**
     * 是否审核(0未审核,1审核通过,2审核不通过)
     */
    private String isExamine;

    /**
     * 审核人id
     */
    private Integer examineId;

    /**
     * 审核意见
     */
    private String examineOpinion;
    /**
     * 审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date examineTime;

    /**
     * 商品删除状态（0 未删除 1 已删除）
     */
    private String delStatus;

    /**
     * 是否是历史版本（0是,1不是）
     */
    private String isHistory;
    @TableField(exist = false)
    private String productTypeName;
    @TableField(exist = false)
    private String storeName;
    @TableField(exist = false)
    private String userName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 商品审核表id
     */
    public Integer getProductExamineId() {
        return productExamineId;
    }

    /**
     * 商品审核表id
     */
    public void setProductExamineId(Integer productExamineId) {
        this.productExamineId = productExamineId;
    }

    /**
     * 门店id
     */
    public Integer getStoreId() {
        return storeId;
    }

    /**
     * 门店id
     */
    public void setStoreId(Integer storeId) {
        this.storeId = storeId;
    }

    /**
     * 商品分类表id
     */
    public Integer getProTypeId() {
        return proTypeId;
    }

    /**
     * 商品分类表id
     */
    public void setProTypeId(Integer proTypeId) {
        this.proTypeId = proTypeId;
    }

    /**
     * 商品id
     */
    public Integer getProductId() {
        return productId;
    }

    /**
     * 商品id
     */
    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    /**
     * 商品名称
     */
    public String getName() {
        return name;
    }

    /**
     * 商品名称
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 商品图片
     */
    public String getPicture() {
        return picture;
    }

    /**
     * 商品图片
     */
    public void setPicture(String picture) {
        this.picture = picture;
    }

    /**
     * 原价
     */
    public Integer getLoadPrice() {
        return loadPrice;
    }

    /**
     * 原价
     */
    public void setLoadPrice(Integer loadPrice) {
        this.loadPrice = loadPrice;
    }

    /**
     * 现价
     */
    public Integer getNewPrice() {
        return newPrice;
    }

    /**
     * 现价
     */
    public void setNewPrice(Integer newPrice) {
        this.newPrice = newPrice;
    }

    /**
     * 是否启用积分
     */
    public String getPointsenabled() {
        return pointsenabled;
    }

    /**
     * 是否启用积分
     */
    public void setPointsenabled(String pointsenabled) {
        this.pointsenabled = pointsenabled;
    }

    /**
     * 商品积分
     */
    public Integer getPoints() {
        return points;
    }

    /**
     * 商品积分
     */
    public void setPoints(Integer points) {
        this.points = points;
    }

    /**
     * 月销售额
     */
    public Double getMonthlySales() {
        return monthlySales;
    }

    /**
     * 月销售额
     */
    public void setMonthlySales(Double monthlySales) {
        this.monthlySales = monthlySales;
    }

    /**
     * 运费是否包邮
     */
    public String getIsFreightShipping() {
        return isFreightShipping;
    }

    /**
     * 运费是否包邮
     */
    public void setIsFreightShipping(String isFreightShipping) {
        this.isFreightShipping = isFreightShipping;
    }

    /**
     * 运费
     */
    public Double getFreight() {
        return freight;
    }

    /**
     * 运费
     */
    public void setFreight(Double freight) {
        this.freight = freight;
    }

    /**
     * 是否上线（0,1）
     */
    public String getIsline() {
        return isline;
    }

    /**
     * 是否上线（0,1）
     */
    public void setIsline(String isline) {
        this.isline = isline;
    }

    /**
     * 商品详情
     */
    public String getProductDetails() {
        return productDetails;
    }

    /**
     * 商品详情
     */
    public void setProductDetails(String productDetails) {
        this.productDetails = productDetails;
    }

    /**
     * 温馨提示
     */
    public String getPrompt() {
        return prompt;
    }

    /**
     * 温馨提示
     */
    public void setPrompt(String prompt) {
        this.prompt = prompt;
    }

    /**
     * 是否审核(0未审核,1审核通过,2审核不通过)
     */
    public String getIsExamine() {
        return isExamine;
    }

    /**
     * 是否审核(0未审核,1审核通过,2审核不通过)
     */
    public void setIsExamine(String isExamine) {
        this.isExamine = isExamine;
    }

    /**
     * 审核人id
     */
    public Integer getExamineId() {
        return examineId;
    }

    /**
     * 审核人id
     */
    public void setExamineId(Integer examineId) {
        this.examineId = examineId;
    }

    /**
     * 审核意见
     */
    public String getExamineOpinion() {
        return examineOpinion;
    }

    /**
     * 审核意见
     */
    public void setExamineOpinion(String examineOpinion) {
        this.examineOpinion = examineOpinion;
    }

    /**
     * 审核时间
     */
    public Date getExamineTime() {
        return examineTime;
    }

    /**
     * 审核时间
     */
    public void setExamineTime(Date examineTime) {
        this.examineTime = examineTime;
    }

    /**
     * 商品删除状态（0 未删除 1 已删除）
     */
    public String getDelStatus() {
        return delStatus;
    }

    /**
     * 商品删除状态（0 未删除 1 已删除）
     */
    public void setDelStatus(String delStatus) {
        this.delStatus = delStatus;
    }

    /**
     * 是否是历史版本（0是,1不是）
     */
    public String getIsHistory() {
        return isHistory;
    }

    /**
     * 是否是历史版本（0是,1不是）
     */
    public void setIsHistory(String isHistory) {
        this.isHistory = isHistory;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProductExamine other = (ProductExamine) that;
        return (this.getProductExamineId() == null ? other.getProductExamineId() == null : this.getProductExamineId().equals(other.getProductExamineId()))
            && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId()))
            && (this.getProTypeId() == null ? other.getProTypeId() == null : this.getProTypeId().equals(other.getProTypeId()))
            && (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPicture() == null ? other.getPicture() == null : this.getPicture().equals(other.getPicture()))
            && (this.getLoadPrice() == null ? other.getLoadPrice() == null : this.getLoadPrice().equals(other.getLoadPrice()))
            && (this.getNewPrice() == null ? other.getNewPrice() == null : this.getNewPrice().equals(other.getNewPrice()))
            && (this.getPointsenabled() == null ? other.getPointsenabled() == null : this.getPointsenabled().equals(other.getPointsenabled()))
            && (this.getPoints() == null ? other.getPoints() == null : this.getPoints().equals(other.getPoints()))
            && (this.getMonthlySales() == null ? other.getMonthlySales() == null : this.getMonthlySales().equals(other.getMonthlySales()))
            && (this.getIsFreightShipping() == null ? other.getIsFreightShipping() == null : this.getIsFreightShipping().equals(other.getIsFreightShipping()))
            && (this.getFreight() == null ? other.getFreight() == null : this.getFreight().equals(other.getFreight()))
            && (this.getIsline() == null ? other.getIsline() == null : this.getIsline().equals(other.getIsline()))
            && (this.getProductDetails() == null ? other.getProductDetails() == null : this.getProductDetails().equals(other.getProductDetails()))
            && (this.getPrompt() == null ? other.getPrompt() == null : this.getPrompt().equals(other.getPrompt()))
            && (this.getIsExamine() == null ? other.getIsExamine() == null : this.getIsExamine().equals(other.getIsExamine()))
            && (this.getExamineId() == null ? other.getExamineId() == null : this.getExamineId().equals(other.getExamineId()))
            && (this.getExamineOpinion() == null ? other.getExamineOpinion() == null : this.getExamineOpinion().equals(other.getExamineOpinion()))
            && (this.getExamineTime() == null ? other.getExamineTime() == null : this.getExamineTime().equals(other.getExamineTime()))
            && (this.getDelStatus() == null ? other.getDelStatus() == null : this.getDelStatus().equals(other.getDelStatus()))
            && (this.getIsHistory() == null ? other.getIsHistory() == null : this.getIsHistory().equals(other.getIsHistory()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getProductExamineId() == null) ? 0 : getProductExamineId().hashCode());
        result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode());
        result = prime * result + ((getProTypeId() == null) ? 0 : getProTypeId().hashCode());
        result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPicture() == null) ? 0 : getPicture().hashCode());
        result = prime * result + ((getLoadPrice() == null) ? 0 : getLoadPrice().hashCode());
        result = prime * result + ((getNewPrice() == null) ? 0 : getNewPrice().hashCode());
        result = prime * result + ((getPointsenabled() == null) ? 0 : getPointsenabled().hashCode());
        result = prime * result + ((getPoints() == null) ? 0 : getPoints().hashCode());
        result = prime * result + ((getMonthlySales() == null) ? 0 : getMonthlySales().hashCode());
        result = prime * result + ((getIsFreightShipping() == null) ? 0 : getIsFreightShipping().hashCode());
        result = prime * result + ((getFreight() == null) ? 0 : getFreight().hashCode());
        result = prime * result + ((getIsline() == null) ? 0 : getIsline().hashCode());
        result = prime * result + ((getProductDetails() == null) ? 0 : getProductDetails().hashCode());
        result = prime * result + ((getPrompt() == null) ? 0 : getPrompt().hashCode());
        result = prime * result + ((getIsExamine() == null) ? 0 : getIsExamine().hashCode());
        result = prime * result + ((getExamineId() == null) ? 0 : getExamineId().hashCode());
        result = prime * result + ((getExamineOpinion() == null) ? 0 : getExamineOpinion().hashCode());
        result = prime * result + ((getExamineTime() == null) ? 0 : getExamineTime().hashCode());
        result = prime * result + ((getDelStatus() == null) ? 0 : getDelStatus().hashCode());
        result = prime * result + ((getIsHistory() == null) ? 0 : getIsHistory().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", productExamineId=").append(productExamineId);
        sb.append(", storeId=").append(storeId);
        sb.append(", proTypeId=").append(proTypeId);
        sb.append(", productId=").append(productId);
        sb.append(", name=").append(name);
        sb.append(", picture=").append(picture);
        sb.append(", loadPrice=").append(loadPrice);
        sb.append(", newPrice=").append(newPrice);
        sb.append(", pointsenabled=").append(pointsenabled);
        sb.append(", points=").append(points);
        sb.append(", monthlySales=").append(monthlySales);
        sb.append(", isFreightShipping=").append(isFreightShipping);
        sb.append(", freight=").append(freight);
        sb.append(", isline=").append(isline);
        sb.append(", productDetails=").append(productDetails);
        sb.append(", prompt=").append(prompt);
        sb.append(", isExamine=").append(isExamine);
        sb.append(", examineId=").append(examineId);
        sb.append(", examineOpinion=").append(examineOpinion);
        sb.append(", examineTime=").append(examineTime);
        sb.append(", delStatus=").append(delStatus);
        sb.append(", isHistory=").append(isHistory);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}